package com.example.factory;

import static com.example.factory.Store.DISCOUNT_8;
import static com.example.factory.Store.DISCOUNT_FULL;

/**
 * Created by Risky57 on 2017/4/28.
 */

public class SaleFactory {

    public static SaleBehavior create(int which){

        switch (which) {
            case Store.DISCOUNT_5:
                return new SaleHalf();
            case DISCOUNT_8:
                return new SaleEight();
            case DISCOUNT_FULL:
                return new SaleFull();
            default:
                return new SaleDefault();
        }

    }

}
